home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: Alpha / Whiteline Alpha.iso / progtool / c / gcc / gempp19.zoo / gem++19 / src / gemap.cc < prev    next >
Encoding:
C/C++ Source or Header  |  1993-11-05  |  850 b   |  42 lines

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. //  This file is Copyright 1992,1993 by Warwick W. Allison.
  4. //  This file is part of the gem++ library.
  5. //  You are free to copy and modify these sources, provided you acknowledge
  6. //  the origin by retaining this notice, and adhere to the conditions
  7. //  described in the file COPYING.LIB.
  8. //
  9. /////////////////////////////////////////////////////////////////////////////
  10.  
  11. #include <aesbind.h>
  12. #include "gemap.h"
  13.  
  14.  
  15. GEMapplication::GEMapplication() :
  16.     ID(appl_init()),
  17.     isnew(TRUE)
  18. { }
  19.  
  20. GEMapplication::GEMapplication(const char *name) :
  21.     isnew(FALSE)
  22. {
  23.     char fname[9];
  24.  
  25.     for (int i=0; name[i] && i<8; i++)
  26.         fname[i]=name[i];
  27.  
  28.     while (i<8) {
  29.         fname[i]=' ';
  30.         i++;
  31.     }
  32.  
  33.     fname[i]=0;
  34.  
  35.     ID=appl_find(fname);
  36. }
  37.  
  38. GEMapplication::~GEMapplication()
  39. {
  40.     if (isnew) appl_exit();
  41. }
  42.